<?php

class Model_LostPassword extends Model_User
{
    public $email;

    public function sendLostPasswordInstructions()
    {
        $data = $this->fetchRow($this
                                ->select()
                                ->from($this->_name, array('username', 'email_confirmation_key'))
                                ->where('email = ?', $this->email));

        if ($data != null)
        {
            $mail = new Model_Mail_LostPasswordInstructions(array(
                        'to' => $this->email,
                        'toName' => $data->username,
                        'confirmationKey' => $data->email_confirmation_key,
                        )
                    );
            $mail->send();

            return true;
        }

        return false;
    }

    public function updatePassword()
    {
    }
}
